-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[Chore](hash) use google/crc32c to instead rocksdb/crc32c and crc_hash #58557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
1 similar comment
|
run buildall |
zclllyybb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we have some test to keep the result consistency? and would this affect storage distribution?
As stated in the description, we already have unit tests for crc32c. |
HappenLee
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
What problem does this PR solve?
doris have crc32c from rocksdb now, but it has poorly performance than google/crc32c.
66663538 rows int
crc32c-rocksdb 684.879ms
crc32c-google 206.360ms
66663538 rows varchar
crc32c-rocksdb 1sec368ms
crc32c-google 391.290ms
We already have unit tests for rocksdb/crc32c(be/test/util/crc32c_test.cpp), so this change is safe
This pull request updates the codebase to use the more efficient and modern CRC32C hashing algorithm in place of the older CRC32 implementation. The changes include switching hash functions throughout the code, updating the CRC32C utility implementation to use an external library, and adding the required third-party dependency. This improves hash performance and consistency, and prepares the codebase for future compatibility.
Hashing algorithm migration:
Replaced all usages of
HashUtil::crc_hashwithHashUtil::crc32c_hashinblock_bloom_filter.hpp,column_dictionary.h, andfunction_string.hto utilize CRC32C for better performance and reliability. [1] [2] [3] [4]Added the new
crc32c_hashmethod toHashUtiland marked the oldcrc_hashas deprecated, retaining it only for backward compatibility with historical data. [1] [2] [3]CRC32C utility refactor and dependency management:
Refactored
crc32c.cppandcrc32c.hto use the externalcrc32clibrary, removing the previous custom implementation and lookup tables. Added new utility functions for CRC32C operations. [1] [2]Added the
crc32cthird-party dependency in the build configuration to support the new CRC32C utility.Build and header updates:
hash_util.hppto reference the new CRC32C utility.Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)